import 'package:flutter/material.dart';
import 'shared/size_fit.dart';

main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    HYSizeFit.initialize();
    return MaterialApp(
      theme: ThemeData(primarySwatch: Colors.teal),
      debugShowCheckedModeBanner: false,
      home: HYHomePage(),
    );
  }
}

class HYHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo'),
        ),
        body: Center(
          child: Container(
            alignment: Alignment.center,
            width: 400.rpx,
            height: 400.rpx,
            color: Colors.teal,
            child: Text(
              'Hello Flutter',
              style: TextStyle(fontSize: 20, color: Colors.white),
            ),
          ),
        ),
        floatingActionButton: FloatingActionButton(
            child: Icon(Icons.add),
            onPressed: () => print('FloatingActionButton click')),
        floatingActionButtonLocation: FloatingActionButtonLocation.endFloat);
  }
}

